import { request } from '../utils/request'

export const requestSearchPositions = (params) => {
    return request('GET', '/es/positions', params)
}

export const requestKeywordsGetParent = (params) => {
    return request('GET', '/keyword/getByParent', params)
}

export const requestChartGetTerm = () => {
    return request('GET', '/webChart/getTerm')
}

export const requestJobTimeNetIncrement = (data) => {
    return request('GET', '/webChart/jobTimeNetIncrement', data=data)
}

export const requestJobTimeMoMIncrement = (data) => {
    return request('GET', '/webChart/jobTimeMoMIncrement', data=data)
}

export const requestPositionSalaryChart = (data) => {
    return request('GET', '/webChart/positionSalaryChart', data=data)
}

export const requestGetEduAndTimeGraph = (params) => {
    return request('GET', '/es/statistics/eduAndTime', params)
}

export const requestGetExpAndTimeGraph = (params) => {
    return request('GET', '/es/statistics/ExpAndTime', params)
}

export const requestUserSubList = (data) => {
    return request('GET', '/subscribe/userSubList', data=data)
}

export const requestKeywordsGetByParent = (params) => {
    return request('GET', '/keyword/getByParent', params)
}

export const requestSubscription= (params, data) => {
    return request('POST', '/subscribe/add', params, data=data)
}

export const requestDeleteSub = (data) => {
    return request('GET', '/subscribe/deleteSub', data=data)
}
